<!DOCTYPE html>
 <html>
 <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>微信安全支付</title>
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>

 </head>
 <body>
<!-- <div align="center">

        <button style="width:210px; height:30px; background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:16px; height:80px;" type="button" onclick="callpay()" >立即支付</button>
    </div> -->
	
   
    <div align="center" style="margin-bottom: 10px;">实付金额</div>
    <div align="center" style=" font-size:20px; margin-bottom: 15px; font-weight:600;"><span style="font-size:24px;">￥</span> {$price_sum} <span style="font-size:20px;">元</span></div>
	<div align="center" style=" border-top: 1px solid #EDEDED; border-bottom: 1px solid #EDEDED;">
	<div style="line-height: 40px;"><span style=" float:left; color:#666; margin-left: 10px;font-size:16px">收款方：</span><span style=" float:right; margin-right: 10px; font-size:16px">莫宁互联网信息服务股份有限公司</span></div>
	<div style="clear: both;"></div>
	<!-- <div style="line-height: 40px;"><span style=" float:left; color:#666; margin-left: 10px;font-size:22px">商&nbsp;&nbsp;&nbsp;&nbsp;品：</span><span style=" float:right; margin-right: 10px; font-size:20px">购买商品</span></div>
	<div style="clear: both;"></div> -->
	</div>
	<div align="center" style="margin-top: 20px;">
		<button style="width:95%; height:50px; border-radius: 5px;background:#43C01A; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:24px" type="button" onclick="callpay()" >立即支付</button>
	</div>
</body>
<script src="__PUBLIC__/Home/js/jweixin-1.0.0.js"></script>
<script>
	function onBridgeReady(){
	   WeixinJSBridge.invoke(
	       'getBrandWCPayRequest', 
	       <?php echo $jsApiParameters; ?>,
	       function(res){     
	           if(res.err_msg == "get_brand_wcpay_request:ok" ) {
						//获取订单号
					<?php
					$orders_num =  $_SESSION['orders_num'];
					$info_a = strpos($orders_num,'u');
            		if($info_a==1){
            		?>
            				window.location.href = "http://www.zzumall.com/index.php/Mobile/Mycenter/person_center.html";
            		<?php }else if($info_a==2){?>
            			window.location.href = "http://www.zzumall.com/index.php/Mobile/Mycenter/person_balance.html";
            		<?php }else{ ?>
            			window.location.href = "http://www.zzumall.com/index.php/Mobile/Order/order_list.html";
            		<?php } ?>
			
			}     	// 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。
	       }
	   ); 
	}
	function callpay()
	{
		if (typeof WeixinJSBridge == "undefined"){
			   if( document.addEventListener ){
			       document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
			   }else if (document.attachEvent){
			       document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
			       document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
			   }
			}else{
			   onBridgeReady();
		}
	}	
</script>
</html>
 </body>
 </html>
